Skip to content

Don't truncate commands + show running commands#1775

Open
Minigamer42 wants to merge 2 commits intopingdotgg:mainfrom
Minigamer42:feature/preserve-runtime-tool-details
Open

Don't truncate commands + show running commands#1775
Minigamer42 wants to merge 2 commits intopingdotgg:mainfrom
Minigamer42:feature/preserve-runtime-tool-details

Conversation

@Minigamer42
Copy link
Copy Markdown

@Minigamer42 Minigamer42 commented Apr 6, 2026

What Changed

  • Removed the manual truncateDetail call for tool calls send by the agent (the output is still truncated via css ellipsis in the UI, but can be viewed by hovering)
  • Show the command while it is running with optionally a different label

Why

  • Longer commands got truncated in the UI
  • Sometimes the agent would run a command in the background and get stuck (like an interactive binary or something that takes very long to complete). Currently the UI gives no feedback on that until the command exits or you kill it via taskmgr or similar.

UI Changes

  • State before this PR:
truncated title
  • Longer command string visible:
unformatted title
  • Different label while the command is running:
running command
  • Same command with formatting:
formatted title

PS: Also works with the latest changes to not show the shell wrapper, this PR is unaffected by that.
image

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Medium Risk
Changes the shape/handling of tool lifecycle activities (including emitting itemId and displaying tool.started for commands), which can affect work-log grouping and UI rendering but does not touch auth or persistence.

Overview
Improves command/tool visibility in the chat work log. Tool lifecycle activities now carry through itemId, and tool.started events for command_execution are no longer dropped so running commands can be shown with an in-progress label.

Stops truncating detail for tool.started/tool.completed activities, and updates work-log collapsing to group lifecycle updates by a stable collapseKey (preferring itemId, otherwise derived from item type + label + command/detail). The timeline UI also keys work-entry rows by collapseKey when available to reduce row churn during updates.

Reviewed by Cursor Bugbot for commit 941b722. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Show running commands in chat and stop truncating command detail

  • tool.started events for command_execution items are now included in the work log (previously all tool.started events were filtered out), displaying a "Running command" title while in progress and "Ran command" on completion.
  • Command detail payloads are no longer truncated in tool.started and tool.completed activities in ProviderRuntimeIngestion.ts.
  • Collapse logic in session-logic.ts is reworked to group lifecycle entries by collapseKey (preferring itemId) across non-adjacent entries, replacing the previous immediate-predecessor-only approach.
  • React keys for work entry rows in MessagesTimeline.tsx now prefer collapseKey over id, which may alter component reuse during updates.
  • Behavioral Change: work log entries now retain collapseKey, and tool.started for non-command items remains filtered out.

Macroscope summarized 941b722.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 6, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 1e44b7e6-22b1-4c8d-9c00-344571269a25

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Apr 6, 2026
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp bot commented Apr 6, 2026

Approvability

Verdict: Needs human review

This PR introduces user-visible behavior changes: showing 'running' command status that was previously hidden, and displaying full command text instead of truncated versions. While the changes are well-scoped to display logic, they meaningfully alter what users see during tool execution and warrant human review.

You can customize Macroscope's approvability policy. Learn more.

@Minigamer42 Minigamer42 force-pushed the feature/preserve-runtime-tool-details branch from b042087 to 941b722 Compare April 6, 2026 16:40
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 941b722. Configure here.

- Stop truncating `detail` when ingesting provider runtime tool events
- carry item IDs and payload data through server ingestion
- collapse tool lifecycle rows by stable item IDs
- keep command start rows visible with clearer labels
@Minigamer42 Minigamer42 force-pushed the feature/preserve-runtime-tool-details branch from 941b722 to 74d4e79 Compare April 6, 2026 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant